#encoding:utf-8

import urllib.request
import urllib.parse  #将字典解析成参数字符串

#parse_qs 详解
params = {
    'name':'zhangsan',
    'age':18,
    "sex":1,
    "greet":"你好",
}

qs = urllib.parse.urlencode(params)
print(qs)
result = urllib.parse.parse_qs(qs)
print(result)